gdk: don't segfault on beep with offscreen window
authorChristian Hergert <christian@hergert.me>
Wed, 22 Apr 2015 23:35:29 +0000 (16:35 -0700)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 27 Apr 2015 10:26:52 +0000 (06:26 -0400)
https://bugzilla.gnome.org/show_bug.cgi?id=748341

gdk/gdkoffscreenwindow.c

index f9e8182471dc336cd407a20e1e17b64443e93416..614e3f03f28dc92f279103b886b3550f249150cd 100644 (file)
@@ -669,6 +669,12 @@ gdk_offscreen_window_set_opacity (GdkWindow *window, gdouble opacity)
 {
 }
 
+static gboolean
+gdk_offscreen_window_beep (GdkWindow *window)
+{
+  return FALSE;
+}
+
 static void
 gdk_offscreen_window_class_init (GdkOffscreenWindowClass *klass)
 {
@@ -701,7 +707,7 @@ gdk_offscreen_window_class_init (GdkOffscreenWindowClass *klass)
   impl_class->destroy_foreign = NULL;
   impl_class->get_shape = NULL;
   impl_class->get_input_shape = NULL;
-  impl_class->beep = NULL;
+  impl_class->beep = gdk_offscreen_window_beep;
 
   impl_class->focus = NULL;
   impl_class->set_type_hint = NULL;